package Admin;

import java.sql.Connection;
import java.sql.DriverManager;

public class MySqlDB {
	
	Connection conn;
	
	public MySqlDB() {
		String driver = "com.mysql.jdbc.Driver";
		String url = "jdbc:mysql://127.0.0.1:3306/beautysite";
		String id = "root";
		String pwd = "ssun";
		
		try{
			Class.forName(driver); //드라이버 로딩
//			System.out.println("드라이버가 로딩됨");
			
			conn = DriverManager.getConnection(url,id,pwd); //연결 객체 생성
//			System.out.print("Connection 생성");
		}catch(Exception ex){ex.printStackTrace();}
	}
	public static void main(String[] args) {
		new MySqlDB();
	}
	
	public Connection getConn() {
		return conn;
	}
	
}
